<div class="body" >
    <button mat-button  [matMenuTriggerFor]="fileMenu" *ngIf="!isDesktop()" >文件</button>
    <button mat-button (click)="openInDesktop()"  *ngIf="!isDesktop()"  >桌面打开</button>
</div>

<mat-menu #fileMenu="matMenu"> 
    <button mat-menu-item   (click)="logout()">登出</button>
</mat-menu>